<?php

namespace app\admin\validate;

use think\Validate;

class TeamValidate extends Validate
{
    /**
     * 定义验证规则
     * 格式：'字段名'    =>    ['规则1','规则2'...]
     *
     * @var array
     */
    protected $rule = [
        'team_name' => 'require|max:50',
        'logo'      => 'require',
    ];

    /**
     * 定义错误信息
     * 格式：'字段名.规则名'    =>    '错误信息'
     *
     * @var array
     */
    protected $message = [
        'team_name.require' => '名称是必须的',
        'team_name.max'     => '名称太长',
        'logo.require'      => '请上传logo',
    ];
}
